<?php defined('SYSPATH') or die('No direct script access.');

class Controller_Index extends Controller_Common {

	public $template='layout/index';

	public function action_index() {
		$this->buildCarcas();

		$this->template->content = View::factory('pages/index', array(
			'slider' => DB::select()->from('slider')->order_by('sort', 'DESC')->limit(5)->as_object()->execute(),
			'about' => Model::factory('Pages')->getAbout(),
			'news' => Model::factory('Articles')->getLastNews()
		));
	}

}
